package au.com.evoCoach.compare;

import java.util.Comparator;

import au.com.evoCoach.domain.PlayerForRound;
import au.com.evoCoach.enums.Position;

public class PlayerForRoundComparator implements Comparator<PlayerForRound> {

    public int compare(PlayerForRound result1, PlayerForRound result2) {
        if (result1.getPlayerPosition().equals(Position.DEF)) {
            return 1;
        }
        else if (result1.getPlayerPosition().equals(Position.DEF)) {
            return -1;
        }
        if (result1.getPlayerPosition().equals(Position.MID)) {
            return 1;
        }
        else if (result1.getPlayerPosition().equals(Position.MID)) {
            return -1;
        }
        if (result1.getPlayerPosition().equals(Position.FWD)) {
            return 1;
        }
        else if (result1.getPlayerPosition().equals(Position.FWD)) {
            return -1;
        }
        if (result1.getPlayerPosition().equals(Position.RUCK)) {
            return 1;
        }
        else {
            return -1;
        }
        
    }
    
}
